from PyQt5.QtWidgets import QSpinBox

class WheelSpinBox(QSpinBox):
    def wheelEvent(self, event):
        if event.angleDelta().y() > 0:
            self.stepUp()
        else:
            self.stepDown()
        event.accept()